﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yxinmt.Interface
{
    public interface IDataGridView : IComponent
    {
        /// <summary>
        /// 视图Border,四边框 
        /// </summary>
       IControl ViewBorder { get; set; }

        /// <summary>
        /// 视图Panel
        /// </summary>
        IControl ViewPanel { get; set; }

        /// <summary>
        /// 列头Grid
        /// </summary>
        IControl HeaderGrid { get; set; }

        /// <summary>
        /// 内容滚动条视图
        /// </summary>
        IControl ContentScrollViewer { get; set; }

        /// <summary>
        /// 内容Grid
        /// </summary>
        IControl ContentGrid { get; set; }
        IControl ContentStackPanel { get; set; }

        /// <summary>
        /// 列集合
        /// </summary>
        List<IDataGridViewColumn> Columns { get; set; }

        /// <summary>
        /// 行集合
        /// </summary>
        List<IDataGridViewRow> Rows { get; set; }

        List<Dictionary<string, object>> ColumnList { get; set; }

        List<IControl> FindControlList(Guid rowColumnId);

        List<IControl> FindRowControlList(string name);

        IControl GetColumnControl(string propertyName);

        IDataGridViewRow GetRow(Guid dataGridViewRowId);

        object GetRowData(Guid dataGridViewRowId);

        void EventInvoke(object sender, EventArgs e, IControl control, string eventType);

        Action<object, EventArgs, IControl, IDataGridViewRow> RowDoubleClick { get; set; }
        Action<object, EventArgs, IControl, IDataGridViewRow> RowMouseDown { get; set; }
        Action<object, EventArgs, IControl, IDataGridViewRow> RowMouseUp { get; set; }
        Action<object, EventArgs, IControl, IDataGridViewRow> RowButtonClick { get; set; }

        Action<object, EventArgs, IControl, IDataGridViewRow> RowClickChange { get; set; }

        IDataGridViewRow SelectedRow { get; set; }

        Func<IDataGridView, object, bool> SetRowSelected { get; set; }

        object DataList { get; set; }

        List<object> GetSelectRowDataList(List<Guid> rowIdList);

        List<IDataGridViewRow> SelectRowList { get; set; }

        void InitSelectRowList(IDataGridViewSelectRowCollection entity);

        byte[] ExportImage();
    }
}
